-
Notifications
You must be signed in to change notification settings - Fork 0
feat: redesign filters to avoid double-layered menus #139
Merged
+1,317
−949
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Moves filters to own Sheet for mobile screens, and adds filters in a sidebar for desktop
Adds useDataIsDelayed so we can show skeletons when the loading takes a while, so the user knows that something is happening, instead of showing the old books permanently
These tests are already covered by RadioFilter and GenreFilter
This is now handled in `expectNoViolations`
This will now have a 7:1 contrast as required by WCAG 2 AAA
|
Looks good! I just pushed a small commit that adds a margin at the bottom of BookFilters, so it doesn't touch the footer when all the filter accordions are open |
hestro
approved these changes
Nov 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the redesign works well, and it's a nice way of reducing the double-layered menu.
Sign in
to join this conversation on GitHub.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This moves things out of the
Draweron desktop, places them to the left side of the books and makes it so the menu never has two levels (opening a Drawer followed by a Dropdown).A few decisions needed to be made during the making of this code.
Using
SheetorDrawerfor mobile:It seems like Sheet is a more natural choice for a menu coming in from the side. However, the Drawer is more optimized for mobile, with things like swipe gestures to close, but may be unnecessary for this component. Furthermore, we don't want users accidentally closing the component while not finished picking filters yet.
Removal of
useIsMobile:This was used to decide whether the overlay came in from the bottom (mobile) or from the left (desktop). Now, it always flies into the screen from the left, so
useIsMobilewas removed.If we'd rather like it to have different entry animations and positions for mobile/desktop, that's of course fine, and this change can be reverted, but that likely means using the Drawer component again.
@hestro: You have also worked on these components. What do you think about the changes? Is there something you think is missing from your version?
Closes #138